<!doctype html>
<html>
{include file="head.html"}

<body>
<div class="header" >
  <a  class="left-btn pointer" href="{$appymdian}" ><span class="iconfont icon-back"></span></a>
  <div class="title">打款管理</div>
</div>
<div class="main-body">
	 <div class="uclist ">
     	<div class="item pd-5">
     	<div class="hd">
        	{if $data.status eq 1}待完成{elseif $data.status eq 2}已完成{else}已取消{/if} <span class="right">￥{$data.money}</span>
        </div>
        
        <div class="row h30">到期时间：{$data.endtime|date:Y-m-d} <span class="right">生成时间：{$data.dateline|date:Y-m-d}</span></div>
            <div class="info">{$data.content}</div>
            <form id="pay-form">
            <input type="hidden" name="id" value="{$data.id}">
            <div class="row h25">
            	<input type="radio" name="ispay" {if $data.ispay neq 2} checked{/if} value="1"> 未付款
            	<input type="radio" name="ispay" {if $data.ispay eq 2} checked{/if}  value="2"> 已付款
            </div> 
             
            <div class="textarea-row">
            	<label>付款信息</label>
                <textarea id="payinfo" name="payinfo">{$data.payinfo}</textarea>
                
             </div>
             </form>
             <button type="button" id="pay-submit" class="btn btn-row">确认付款了</button>
        </div>
     </div>
</div>
<script>
	$(function(){
		$("#pay-submit").on("click",function(data){
			$.post("{$appymdian}?m=ymdian_dakuan&a=save&ajax=1",$("#pay-form").serialize(),function(data){
				if(data.error){
					skyToast(data.message);
				}else{
					skyToast("保存成功");
				}
			},"json");
		});
	});
</script>
{include file="footer.html"}
</body>
</html>
